home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / a_man / cat1 / nsd.z / nsd
Encoding:
Text File  |  2001-04-17  |  18.1 KB  |  397 lines

  1.  
  2.  
  3.  
  4. NNNNSSSSDDDD((((1111MMMM))))                                                                NNNNSSSSDDDD((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      nsd - UNS name service daemon
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ////uuuussssrrrr////eeeettttcccc////nnnnssssdddd [ ----llllnnnnvvvv ] [ ----tttt _t_i_m_e_o_u_t ] [ ----aaaa _k_e_y=_v_a_l_u_e ]
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      The Unified Name Service (UNS) provides a generic interface to network
  16.      lookup services.  The daemon provides a filesystem front end to the name
  17.      service namespace, and maintains local cache files.  The services that
  18.      the nsd daemon supports are NIS and NIS+ - the Network Information
  19.      Service, DNS - the Domain Name Service, local configuration files, MDBM,
  20.      NDBM, and DB - local hash files, LDAP - Lightweight Directory Access
  21.      Protocol.
  22.  
  23.      By default the nsd daemon is activated at system startup time from the
  24.      /_e_t_c/_i_n_i_t._d/_n_e_t_w_o_r_k startup script if the configuration flag nnnnssssdddd is set
  25.      on (see _c_h_k_c_o_n_f_i_g(1M)).  The default options to the daemon can be set by
  26.      changing the file /_e_t_c/_c_o_n_f_i_g/_n_s_d._o_p_t_i_o_n_s.
  27.  
  28.      The nsd daemon acts as a user level stacked filesystem.  Each request is
  29.      converted into a pathname and an internal filesystem tree is walked to
  30.      find the result.  If any path element does not exist name service library
  31.      routines are called in order until the element is found.  The libraries,
  32.      and the order to use them, are specified in the nsd configuration file
  33.      nnnnsssssssswwwwiiiittttcccchhhh....ccccoooonnnnffff.  For the default domain this is /etc/nsswitch.conf, and
  34.      for domains for which we are a server it would be
  35.      /var/ns/domains/<domainname>/nsswitch.conf (for the given <domainname>).
  36.  
  37.      Keys which are looked up are cached into local hash files found in
  38.      /var/ns/cache/.  The name service API routine ns_lookup(3N) will check in
  39.      the cache for keys that have already been looked up before calling the
  40.      nsd daemon.  All of the name service library routines such as
  41.      getpwnam(3C), gethostbyname(3N), etc. are built on top of the
  42.      ns_lookup(3) interface.
  43.  
  44.      The nsd daemon presents the keys through the filesystem in the files
  45.      /ns/domain/table/key.  To lookup the password entry for the root user in
  46.      the domain engr.sgi.com you could simply cat the file:
  47.      /ns/engr.sgi.com/passwd.byname/root.  A special directory ._l_o_c_a_l is
  48.      created for the local domain so the root password entry for the local
  49.      domain can always be found in the file: /ns/.local/passwd.byname/root.  A
  50.      special file ._a_l_l is created in each table directory which enumerates the
  51.      entire table.  Using 'cat /ns/.local/passwd.byname/.all' would list every
  52.      password entry using all the library routines listed in nsswitch.conf.
  53.      Finally, a special directory ._l_i_b_r_a_r_y is created under each table
  54.      directory for each of the libraries listed for that table in
  55.      nsswitch.conf.  Listing every password entry for the local NIS domain can
  56.      be done by: 'cat /ns/.local/passwd.byname/.nis/.all'.
  57.  
  58.      When the nsd daemon is started it automatically mounts the name service
  59.      namespace onto /_n_s using the nsmount command.  The ns_lookup() library
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. NNNNSSSSDDDD((((1111MMMM))))                                                                NNNNSSSSDDDD((((1111MMMM))))
  71.  
  72.  
  73.  
  74.      routine will always open files under this directory to satisfy the
  75.      requests from name service lookups so this should not be changed.
  76.  
  77.  
  78. AAAAttttttttrrrriiiibbbbuuuutttteeeessss
  79.      The nsd daemon uses named attributes attached to the files in its
  80.      internal filesystem to control behavior.  Attributes are inherited from
  81.      parent directories if they do not exist on the individual files.  These
  82.      attributes are usually set from the nsswitch.conf configuration file, but
  83.      global attributes can be set from the command line using the ----aaaa option.
  84.      Attributes are key value pairs where both the key and value are strings,
  85.      but may be interpreted internally as character strings, integers or
  86.      booleans.
  87.  
  88.      Most attributes are library specific, and are listed in the section 7P
  89.      manual page for the protocols, but a few are universal or used by the nnnnssssdddd
  90.      daemon proper.  Attributes that are to be set for all domains for for use
  91.      by nsd must be set on the nsd command line using the -a flag.  Attributes
  92.      that are intended for one library may be set in the appropriate
  93.      nsswitch.conf file.  Attributes that are not supported by a library are
  94.      simply ignored.
  95.  
  96.      ttttiiiimmmmeeeeoooouuuutttt
  97.           The ttttiiiimmmmeeeeoooouuuutttt attribute sets the cache file record timeout in seconds.
  98.           This should be set to a positive integer value, the default is 300
  99.           (five minutes).
  100.  
  101.      nnnneeeeggggaaaattttiiiivvvveeee____ttttiiiimmmmeeeeoooouuuutttt
  102.           The nnnneeeeggggaaaattttiiiivvvveeee____ttttiiiimmmmeeeeoooouuuutttt attribute sets the cache file record timeout in
  103.           seconds for lookups that failed.  If this attribute is unset (the
  104.           default) the value of the ttttiiiimmmmeeeeoooouuuutttt attribute is used.  This should be
  105.           set to a positive integer value, the default is to use the value of
  106.           the timeout attribute which defaults to 300 seconds.
  107.  
  108.      llllooooooookkkkuuuupppp____ttttiiiimmmmeeeeoooouuuutttt
  109.           The llllooooooookkkkuuuupppp____ttttiiiimmmmeeeeoooouuuutttt attribute set the timeout of files under /ns in
  110.           seconds.  If this attribute is unset (the default) the internal file
  111.           timeout (-t command line option) is used.  This should be set to a
  112.           positive integer value, and defaults to the value given by the '-t'
  113.           command line option, or 30 seconds.
  114.  
  115.      lllliiiisssstttt____ttttiiiimmmmeeeeoooouuuutttt
  116.           The lllliiiisssstttt____ttttiiiimmmmeeeeoooouuuutttt attribute set the timeout of the special
  117.           enumeration files under /ns (.all) in seconds. If this attribute is
  118.           unset (the default) the internal file timeout (-t command line
  119.           option) is used.  This should be set to a positive integer value,
  120.           the default is to use the value given with the '-t' command line
  121.           option, or 30 seconds.
  122.  
  123.      wwwwaaaaiiiitttt____ffffoooorrrr____sssseeeerrrrvvvveeeerrrr
  124.           The wwwwaaaaiiiitttt____ffffoooorrrr____sssseeeerrrrvvvveeeerrrr attribute determines whether nsd should try
  125.           forever to reach a name server or should fail the request if a
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. NNNNSSSSDDDD((((1111MMMM))))                                                                NNNNSSSSDDDD((((1111MMMM))))
  137.  
  138.  
  139.  
  140.           server cannot be found.  This is a boolean value which should be set
  141.           to "true" or "false", and defaults to false.
  142.  
  143.           NOTE: Users should be aware that if using this attribute, lookups to
  144.           maps present in /etc/nsswitch.conf on client machines will loop
  145.           infinately if using "nis" as the protocol and the map is not present
  146.           on the NIS server. To prevent this on such maps, make sure nis is
  147.           not in the protocol list for that map.
  148.  
  149.      ddddoooommmmaaaaiiiinnnn
  150.           The ddddoooommmmaaaaiiiinnnn attribute is empty by default and sets the default
  151.           domain.  The interpretation of this varies by protocol.  It should
  152.           be set to a character string, see the protocol man pages for
  153.           explanations of how this string is used.
  154.  
  155.      pppprrrrooooggggrrrraaaammmm
  156.           The pppprrrrooooggggrrrraaaammmm attribute is the name of the daemon used in printing
  157.           error messages.  It is automatically set to the character string
  158.           passed in the environment, and should be considered read only.
  159.  
  160.      lllliiiibbbbrrrraaaarrrryyyy
  161.           The lllliiiibbbbrrrraaaarrrryyyy attribute is set to the name of the protocol library, as
  162.           given in nsswitch.conf, which provided the information.  It should
  163.           be considered read only.
  164.  
  165.      hhhhoooossssttttnnnnaaaammmmeeee
  166.           The hhhhoooossssttttnnnnaaaammmmeeee attribute is the primary name of the local system.  It
  167.           is automatically set by calling hhhhoooossssttttnnnnaaaammmmeeee((((1111)))), and should be
  168.           considered read only.
  169.  
  170.      llllooooccccaaaallll
  171.           The llllooooccccaaaallll attribute marks part of the tree as being only accessible
  172.           by the local host.  By default the ".local" domain is marked as
  173.           llllooooccccaaaallll, while all other trees may be remotely read.  This is a
  174.           boolean value which defaults to "false" for all but the ".local"
  175.           subtree which defaults to "true".
  176.  
  177.      mmmmooooddddeeee The mmmmooooddddeeee attribute controls the permissions of the cache files
  178.           created by nsd.   This should be set to an octal integer value, the
  179.           default is 0666 and is modified by the nsd processes umask.
  180.  
  181.      oooowwwwnnnneeeerrrr
  182.           The oooowwwwnnnneeeerrrr attribute controls the owner of the cache files created by
  183.           nsd.  This should be set to an integer user ID, and the default is
  184.           0.
  185.  
  186.      ggggrrrroooouuuupppp
  187.           The ggggrrrroooouuuupppp attribute controls the group of the cache files created by
  188.           nsd.   This should be set to an integer group ID and the default is
  189.           0.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. NNNNSSSSDDDD((((1111MMMM))))                                                                NNNNSSSSDDDD((((1111MMMM))))
  203.  
  204.  
  205.  
  206.      ccccaaaacccchhhheeeessssiiiizzzzeeee
  207.           The ccccaaaacccchhhheeeessssiiiizzzzeeee attribute controls the fixed size of the cache files
  208.           created by nsd.  This should be set to an integer power of 2 and
  209.           defaults to 4.  The formula for computing the resulting cache size
  210.           is:  (2^n * p), where nnnn is the value of the ccccaaaacccchhhheeeessssiiiizzzzeeee parameter and
  211.           pppp is the current pagesize.  Using the default values, this formula
  212.           becomes (2^4 * 4096) or 64KB.
  213.  
  214.      ppppaaaaggggeeeessssiiiizzzzeeee
  215.           The ppppaaaaggggeeeessssiiiizzzzeeee attribute controls the mdbm pagesize of the cache files
  216.           created by nsd.   This should be set to an integer power of 2
  217.           between 8 and 16.  The default is 12 resulting in a 4KB page size.
  218.  
  219.      ccccaaaasssseeeeffffoooolllldddd
  220.           The ccccaaaasssseeeeffffoooolllldddd attribute tells the protocol libraries that keys should
  221.           be delt with in a case insensitive manner.  The default is unset
  222.           (false) except for the maps bootparams, ethers.byname, hosts.byname,
  223.           mail.aliases, and netgroup.byhost which default to "true".   For
  224.           protocol libraries that can not process keys in a case insensitive
  225.           manner, the key will be lowercased.
  226.  
  227.      ddddyyyynnnnaaaammmmiiiicccc
  228.           The ddddyyyynnnnaaaammmmiiiicccc attribute allows nsd to create and use table names that
  229.           have not been listed in nnnnsssssssswwwwiiiittttcccchhhh....ccccoooonnnnffff((((4444)))).  The dynamic tables are
  230.           created as subdirectories of the table marked ddddyyyynnnnaaaammmmiiiicccc.  The obvious
  231.           example would be AAAAuuuuttttooooFFFFSSSS maps.  The nsswitch.conf line:
  232.  
  233.                automount(dynamic): nis ldap
  234.  
  235.           instructs nsd to allow tables to be created as subdirectories of the
  236.           aaaauuuuttttoooommmmoooouuuunnnntttt directory.  The dynamically created tables inherit all
  237.           protocol information (nnnniiiissss first followed by llllddddaaaapppp) as well as owner
  238.           and permissions from their parent directory, in this case
  239.           ////nnnnssss////....llllooooccccaaaallll////aaaauuuuttttoooommmmoooouuuunnnntttt. Following the filesystem semantics of the nsd
  240.           interface, the dynamic tables are created with the mmmmkkkkddddiiiirrrr((((2222)))) system
  241.           call.
  242.  
  243.      eeeennnnuuuummmmeeeerrrraaaatttteeee____kkkkeeeeyyyy
  244.           The eeeennnnuuuummmmeeeerrrraaaatttteeee____kkkkeeeeyyyy attribute requests that the key be added to the
  245.           line for each item when enumerating a map.  This exists for maps
  246.           which traditionally did not include the keys but may need to be
  247.           parsed like the traditional file that they were generated from.
  248.           These are: automount, bootparams and netgroup.
  249.  
  250. AAAADDDDMMMMIIIINNNNIIIISSSSTTTTRRRRAAAATTTTIIIIOOOONNNN
  251.      The command nnnnssssaaaaddddmmmmiiiinnnn(1M) allows for a simple protocol-independent method
  252.      for manipulating the name space and cache files maintained by nsd.
  253.  
  254.      The nsd daemon has handlers for a number of signals so that its behavior
  255.      can be controlled while running.  Sending nsd the SIGHUP signal will
  256.      cause the daemon to reread all the nsswitch.conf files and rebuild its
  257.      internal filesystem.  The SIGUSR1 signal will cause the daemon to write a
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. NNNNSSSSDDDD((((1111MMMM))))                                                                NNNNSSSSDDDD((((1111MMMM))))
  269.  
  270.  
  271.  
  272.      listing of its filesystem into the file /_v_a_r/_t_m_p/_n_s_d._d_u_m_p which can be
  273.      useful for debugging.  The SIGUSR2 signal will cycle the log level,
  274.      increasing the level one value on each signal through level six, then
  275.      setting it back to zero.  Sending the SIGTERM signal will cause nsd to
  276.      exit cleanly, attempting to unmount the /ns filesystem.
  277.  
  278.      An example would be if you changed the nsswitch.conf file you would type:
  279.      "killall -HUP nsd" for the changes to take affect.
  280.  
  281.  
  282. NNNNSSSSDDDD OOOOPPPPTTTTIIIIOOOONNNNSSSS
  283.      The following options can be specified in /_e_t_c/_c_o_n_f_i_g/_n_s_d._o_p_t_i_o_n_s or on
  284.      the nsd command line:
  285.  
  286.      ----aaaa  kkkkeeeeyyyy====vvvvaaaalllluuuueeee
  287.           sets the named attribute given by key to the string given by value.
  288.           See above, and each of the protocol man pages, for interesting
  289.           attributes with their default and allowable values.
  290.  
  291.      ----llll  lllleeeevvvveeeellll
  292.           sets the log level to a value from 0 through 6.  The higher the
  293.           level the more verbose the debug logging.  This defaults to 1, and
  294.           can be changed at run time by sending the SIGUSR2 signal to the
  295.           process.  Levels above 2 are primarily for debugging.
  296.  
  297.      ----nnnn   tells nsd not to mount the /ns filesystem.
  298.  
  299.      ----tttt  ttttiiiimmmmeeeeoooouuuutttt
  300.           sets the internal file timeout to the specified value in seconds.
  301.           The default in 30 seconds.
  302.  
  303.      ----vvvv   ``Verbose'' - run the daemon in foreground and display messages to
  304.           stderr instead of syslog.
  305.  
  306.  
  307. FFFFIIIILLLLEEEESSSS
  308.      /etc/config/nsd.options
  309.      /etc/nsswitch.conf
  310.      /var/ns/cache/*
  311.      /var/ns/domains/*
  312.      /var/ns/lib/libns_*.so
  313.      /var/tmp/nsd.dump
  314.  
  315.  
  316. BBBBUUUUGGGGSSSS
  317.      Since the nsd daemon uses the NFS protocol to present the data to the
  318.      local system it should never be sent a SIGKILL signal, or be forced to
  319.      exit.  Doing so results in logged messages of the form "NFS3 access
  320.      failed for server localhost (nsd): Timed out".  Cleanly unmounting the
  321.      filesystem or restarting the daemon will stop these messages.
  322.  
  323.      When the nsd daemon is not running, or not responding the name service
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. NNNNSSSSDDDD((((1111MMMM))))                                                                NNNNSSSSDDDD((((1111MMMM))))
  335.  
  336.  
  337.  
  338.      routines fall back to local files.
  339.  
  340.  
  341. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  342.      ns_lookup(3N), ns_list(3N), nsmount(1M), nsadmin(1M), nsswitch.conf(4),
  343.      chkconfig(1M), dns(7P), nis(7P), files(7P), mdbm(7P), db(7P), ndbm(7P),
  344.      ldap(7P)
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.